<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page import="com.control.AdminControl" %>
<%
	if (session.getAttribute("user_num") == null
			|| session.getAttribute("user_pwd") == null)
		out.print("<script>alert('请先登录！');window.location.href='login.jsp'</script>");
%>
<%
int admin_id=(Integer)session.getAttribute("user_id");
AdminControl ac=new AdminControl();
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head>
	<title>寝室小管家管理员登录页面</title>
	<link id="classlinkid" href="css/dataTable2.css" rel="stylesheet"
		type="text/css" />
	<link rel="StyleSheet" href="css/public.css" type="text/css" />
	<link rel="StyleSheet" href="css/menu1.css" type="text/css" />
	<style type="text/css">
#menu_zzjs_net {
	margin: 10px 10px 10px 1px;
	width: 150px;
	overflow: hidden;
	float: left;
}

#menu_zzjs_net li {
	line-height: 25px;
}

#menu_zzjs_net li a {
	color: #666666;
	padding-left: 5px;
	outline: none;
	blr: expression(this.onFocus =   this.blur () );
}

#menu_zzjs_net .two {
	padding-left: 45px;
	display: none;
}

#menu_zzjs_net li {
	list-style-type: none;
}

.topbg99 {
	height: 78px;
	width: 100%;
	clear: both;
}

.logo {
	float: left;
	width: 215px;
	height: 23px;
	padding-top: 3px;
	margin-left: 20px;
}
</style>
</head>
<body style="min-width: 1003px">
	<div class="top" style="background: url(images/woca.gif);">
		<div class="topbg99">
			<div class="logo" style="">
				<img src="images/33.gif" width="327" height="47" alt="logo" />
			</div>
			<div class="gj" style="margin: 8px 20px 0px 0px; text-align: right;">
				<span style="color: #FFFFFF">您好，<b><%=ac.getAdmin(admin_id).getAdmin_name() %></b>
				</span> &nbsp;
				<a href="logout.jsp">退出</a>
			</div>
		</div>
	</div>
	<div class="main">
		<table border="0" cellpadding="0" cellspacing="0" height="100%"
			width="100%">
			<tbody>
				<tr>
					<td width="200" height="100%" valign="top">
						<div
							style="width: 180px; height: 100%; float: left; overflow: auto; border: #b3c8d9 solid 1px;">
							<div
								style="background: url(images/menu1-6.gif); height: 33px; line-height: 38px;">
								<span
									style="padding-top: 10px; padding-left: 50px; font-size: 14px; font-weight: bold;">功能导航</span>
								<ul id="menu_zzjs_net">
									<li>
										<label style="font-size: 12px; font-weight: bold;">
											<a href="javascript:;"> <img src="images/file1.gif" />
												管理员信息管理</a>
										</label>
										<ul class="two">
											<li>
												<label>
													<a href="admin/admin_control/adminInfo_show.jsp" target="admin_main"> 查询管理员信息</a>
												</label>
											</li>
											<li>
												<label>
													<a href="admin/admin_control/admin_insert.jsp" target="admin_main">添加新管理员</a>
												</label>
											</li>
											<li>
												<label>
													<a href="admin/admin_control/updatepwd.jsp" target="admin_main">修改个人密码</a>
												</label>
											</li>
										</ul>
									</li>
									<li>
										<label style="font-size: 12px; font-weight: bold;">
											<a href="javascript:;"> <img src="images/file1.gif" />
												学生信息管理</a>
										</label>
										<ul class="two">
											<li>
												<label>
													<a href="admin/student_control/studentInfo_show.jsp" target="admin_main"> 查询学生信息</a>
												</label>
											</li>
											<li>
												<label>
													<a href="admin/student_control/student_insert.jsp" target="admin_main"> 添加学生信息</a>
												</label>
											</li>
										</ul>
									</li>
									<li>
										<label style="font-size: 12px; font-weight: bold;">
											<a href="javascript:;"> <img src="images/file1.gif" />
												寝室卫生评比</a>
										</label>
										<ul class="two">
											<li>
												<label>
													<a href="admin/health_control/Give_score_show.jsp" target="admin_main">查询卫生情况</a>
												</label>
											</li>
											<li>
												<label>
													<a href="admin/health_control/Give_score.jsp" target="admin_main">为寝室评分 </a>
												</label>
											</li>
										</ul>
									</li>
									<li>
										<label style="font-size: 12px; font-weight: bold;">
											<a href="javascript:;"><img src="images/file1.gif" />
												寝室物品管理</a>
										</label>
										<ul class="two">
											<li>
												<label>
													<a href="admin/resource_control/resource_show.jsp" target="admin_main"> 查看物品信息</a>
												</label>
											</li>
											<li>
												<label>
													<a href="admin/resource_control/add_resource.jsp" target="admin_main"> 添加物品信息</a>
												</label>
											</li>
											<li>
												<label>
													<a href="admin/resource_control/possession_show.jsp" target="admin_main"> 查看寝室物品</a>
												</label>
											</li>
										</ul>
									</li>
									<li>
										<label style="font-size: 12px; font-weight: bold;">
											<a href="javascript:;"><img src="images/file1.gif" />
												报修信息管理</a>
										</label>
										<ul class="two">
											<li>
												<label>
													<a href="admin/serve_control/fault_show.jsp" target="admin_main"> 查看故障信息</a>
												</label>
											</li>
										</ul>
									</li>
									<li>
										<label style="font-size: 12px; font-weight: bold;">
											<a href="javascript:;"><img src="images/file1.gif" />
												公告管理</a>
										</label>
										<ul class="two">
											<li>
												<label>
													<a href="admin/post_control/post_show.jsp" target="admin_main"> 查看公告</a>
												</label>
											</li>
											<li>
												<label>
													<a href="admin/post_control/publish_post.jsp" target="admin_main"> 发布公告</a>
												</label>
											</li>
										</ul>
									</li>
									<li>
										<label style="font-size: 12px; font-weight: bold;">
											<a href="javascript:;"><img src="images/file1.gif" />
												意见管理</a>
										</label>
										<ul class="two">
											<li>
												<label>
													<a href="admin/comment_control/comment_show.jsp" target="admin_main"> 查看意见</a>
												</label>
											</li>
										</ul>
									</li>
									
								</ul>
							</div>
						</div>
						
					</td>
					<td width="846" valign="top"
						style="width: 100%; height: 100%; border-top: #b3c8d9 solid 1px;">
						<iframe allowtransparency="true" frameborder="0" name="admin_main"
							src="index.jsp" scrolling="yes" height="100%" width="100%"
							style="overflow: visible;"></iframe>
					</td>
				</tr>
			</tbody>
		</table>
		</div>
		<script type="text/javascript">
	function addEvent(el, name, fn) {
		if (el.addEventListener)
			return el.addEventListener(name, fn, false);
		return el.attachEvent('on' + name, fn);
	}
	function nextnode(node) {
		if (!node)
			return;
		if (node.nodeType == 1)
			return node;
		if (node.nextSibling)
			return nextnode(node.nextSibling);
	}
	function prevnode(node) {
		if (!node)
			return;
		if (node.nodeType == 1)
			return node;
		if (node.previousSibling)
			return prevnode(node.previousSibling);
	}
	function parcheck(self, checked) {
		var par = prevnode(self.parentNode.parentNode.parentNode.previousSibling), parspar;
		if (par && par.getElementsByTagName('input')[0]) {
			par.getElementsByTagName('input')[0].checked = checked;
			parcheck(par.getElementsByTagName('input')[0], sibcheck(par
					.getElementsByTagName('input')[0]));
		}
	}
	function sibcheck(self) {
		var sbi = self.parentNode.parentNode.parentNode.childNodes, n = 0;
		for ( var i = 0; i < sbi.length; i++) {
			if (sbi[i].nodeType != 1)
				n++;
			else if (sbi[i].getElementsByTagName('input')[0].checked)
				n++;
		}
		return n == sbi.length ? true : false;
	}
	addEvent(
			document.getElementById('menu_zzjs_net'),
			'click',
			function(e) {
				e = e || window.event;
				var target = e.target || e.srcElement;
				var tp = nextnode(target.parentNode.nextSibling);
				switch (target.nodeName) {
				case 'A':
					if (tp && tp.nodeName == 'UL') {
						if (tp.style.display != 'block') {
							tp.style.display = 'block';
							prevnode(target.parentNode.previousSibling).className = 'ren'
						} else {
							tp.style.display = 'none';
							prevnode(target.parentNode.previousSibling).className = 'add'
						}
					}
					break;
				case 'SPAN':
					var ap = nextnode(nextnode(target.nextSibling).nextSibling);
					if (ap.style.display != 'block') {
						ap.style.display = 'block';
						target.className = 'ren'
					} else {
						ap.style.display = 'none';
						target.className = 'add'
					}
					break;
				case 'INPUT':
					if (target.checked) {
						if (tp) {
							var checkbox = tp.getElementsByTagName('input');
							for ( var i = 0; i < checkbox.length; i++)
								checkbox[i].checked = true;
						}
					} else {
						if (tp) {
							var checkbox = tp.getElementsByTagName('input');
							for ( var i = 0; i < checkbox.length; i++)
								checkbox[i].checked = false;
						}
					}
					parcheck(target, sibcheck(target));
					break;
				}
			});
	window.onload = function() {
		var labels = document.getElementById('menu_zzjs_net')
				.getElementsByTagName('label');
		for ( var i = 0; i < labels.length; i++) {
			var span = document.createElement('span');
			span.style.cssText = 'display:inline-block;height:18px;vertical-align:middle;width:16px;cursor:pointer;';
			span.innerHTML = ' '
			span.className = 'add';
			if (nextnode(labels[i].nextSibling)
					&& nextnode(labels[i].nextSibling).nodeName == 'UL')
				labels[i].parentNode.insertBefore(span, labels[i]);
			else
				labels[i].className = 'rem'
		}
	}
</script>
</body>
</html>
